//
//  BKUserDeleteBtnView.m
//  bestkeep
//
//  Created by windCould on 16/12/2.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKUserDeleteBtnView.h"
#import "masonry.h"

@interface BKUserDeleteBtnView ()

@property(nonatomic,strong)UIButton * deleBtn;

@end



@implementation BKUserDeleteBtnView

#pragma mark =========================Function==============================

-(void)deleBtnClick
{
    if ([self.myDelegate respondsToSelector:@selector(bkUserDeleteBtnView:deleteBtnClick:)]) {
        
        [self.myDelegate bkUserDeleteBtnView:self deleteBtnClick:nil];
    }
}


#pragma mark =========================布局===================================
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setUpViews];
        
    }
    
    return  self;
}


-(void)setUpViews{
    
    
    _deleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [_deleBtn setBackgroundColor:HexColor(0XE63E2E)];
    [_deleBtn setTitle:@"取消收藏" forState:UIControlStateNormal];
    [_deleBtn addTarget:self action:@selector(deleBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_deleBtn];
    
    [self layoutViews];
}

-(void)layoutViews{
    
    [_deleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(self.mas_top).offset(0);
        make.left.mas_equalTo(self.mas_left).offset(0);
        make.right.mas_equalTo(self.mas_right).offset(0);
        make.bottom.mas_equalTo(self.mas_bottom).offset(0);
    }];
    
}



@end
